#include "stdio.h"
#include "stdlib.h"

// define student struct
struct StuInfo
{
    int ID; // student ID
    char name[21]; // student name
    double c_score; // score for c programming
};

// calculate the avarage score of all students
double avgScore(struct StuInfo st1, struct StuInfo st2)
{
    return (st1.c_score + st2.c_score) / 2.0;
}

// the main function
int main()
{
    struct StuInfo st1 = {101, "Tom", 90.5}, st2 = {102, "Jerry", 64.0};

    printf("The average score is %f\n", avgScore(st1, st2));

    return 0;
}
